<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>View Tracked Users</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<!-- YAML css -->
<link href="css/sl-www-integration.css" rel="stylesheet" type="text/css"/>
<!--[if lte IE 7]>
<link href="../css/patches/patch_my_layout.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!-- (en) Add your meta data here -->
<!-- Add special class to display Meta font -->
<script type="text/javascript" src="js/typeface.js"></script>
<script type="text/javascript" src="js/metabooklf-roman_regular.typeface.js"></script>
</head>
<body>
<div class="page_margins">
	<div class="page">
		<div id="header">
			<div id="SLWWWIntegrationLogo">
				<a href="/">
					<img alt="SL WWW Integration Logo" src="images/SLWWWIntegration.gif"/>
				</a>
			</div>
			<h1>View Tracked Users</h1>
			<span>Internal SQLite database</span>
		</div>
		<!-- begin: main content area #main -->
		<div id="main">
			<div id="col1">
			<!--<div id="col3_content" class="clearfix"> <a id="content" name="content"></a>-->
					<!-- skiplink anchor: Content -->
<?php
include_once("common.inc.php");

// we assume the request comes from Second Life or OpenSimulator and don't do a lot of checks


?>
	<table border="1">
	<thead>
		<tr>
			<td>Id</td>
			<td>Key</td>
			<td>Name</td>
			<td>ObjectKey</td>
			<td>ObjectName</td>
			<td>Location</td>
			<td>Pos</td>
			<td>Rot</td>
<!--		<td>Vel</td> -->
			<td>LastUpdate</td>
		</tr>
	</thead>
	<tbody>
<?php
// fetch rows from the 'avatars' database table

$result = $db->query("SELECT * FROM avatars");

$rows = $result->fetchAll();

foreach($rows as $row)
{
	echo "\t\t<tr>\n\t\t\t<td>".$row['id'].'</td>'.
		 '<td>'.$row['Key'].'</td>'.
		 '<td>'.$row['Name'].'</td>'.
		 '<td>'.$row['ObjectKey'].'</td>'.
		 '<td>'.$row['ObjectName'].'</td>'.
		 '<td>'.$row['Location'].'</td>'.
		 '<td>'.$row['Pos'].'</td>'.
		 '<td>'.$row['Rot'].'</td>'.
/*		 '<td>'.$row['Vel'].'</td>'. */
		 '<td>'.$row['LastUpdate']."</td>\n".
		 "\t\t</tr>\n";
}
?>
	</tbody>
	</table>
					<!--</div>-->
				<div id="ie_clearing">&nbsp;</div>
				<!-- End: IE Column Clearing -->
			</div>
			<!-- end: #col3 -->
		</div>
		<!-- end: #main -->
		<!-- begin: #footer -->
		<div id="footer">© 2012 by Beta Technologies. Some rights reserved.<br />
Layout based on <a href="http://www.yaml.de/">YAML</a></div>
		<!-- end: #footer -->
	</div>
</div>
</body>
</html>
